package com.euro.video.phone.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.euro.video.phone.dao.DevisDao;
import com.euro.video.phone.entities.Devis;

@Service
public class DevisService {
	@Autowired
	private DevisDao devisDao;
	
	public Devis creer(Devis devis) throws Exception {
		return devisDao.creerDevis(devis);
	}
	
	public Devis lire(long idDevis) throws Exception {
		return devisDao.lireDevis(idDevis);
	}
	
	public Devis modifier(Devis devis) throws Exception {
		return devisDao.modifierDevis(devis);
	}
	
	public boolean supprimer(Devis devis) throws Exception {
		return devisDao.supprimerDevis(devis);
	}
	
	public List<Devis> tousLesDevisNonTraites() throws Exception {
		return devisDao.tousLesDevisNonTraites();
	}
	
	public List<Devis> tousLesDevisTraites() throws Exception {
		return devisDao.tousLesDevisTraites();
	}
}
